<html>
<head>
	<title>列表</title>
	<%include("/base/header.html"){} %>
	<%include("/base/css.html"){} %>
	<link rel="stylesheet" href="${staticPath}/css/content2.css">
</head>
<body>
<div class="layui-layout layui-layout-admin">
	<form class="layui-form layui-form-pane" id="search-form">
		<div class="layui-form-item">
            <div class="layui-input-inline">
                <label class="layui-form-label">主键:</label>
                <input type="text" value="" name="id" placeholder="主键" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">实体主键:</label>
                <input type="text" value="" name="modelId" placeholder="实体主键" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">属性名:</label>
                <input type="text" value="" name="name" placeholder="属性名" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">字段名:</label>
                <input type="text" value="" name="columnName" placeholder="字段名" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">字段长度:</label>
                <input type="text" value="" name="columnLenth" placeholder="字段长度" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">排序号:</label>
                <input type="text" value="" name="soft" placeholder="排序号" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">显示名:</label>
                <input type="text" value="" name="label" placeholder="显示名" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">数据类型:</label>
                <input type="text" value="" name="dataType" placeholder="数据类型" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">是否显示在列表:</label>
                <input type="text" value="" name="isShowGrid" placeholder="是否显示在列表" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">是否查询条件:</label>
                <input type="text" value="" name="isSearchItem" placeholder="是否查询条件" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">是否必填:</label>
                <input type="text" value="" name="isRequired" placeholder="是否必填" class="layui-input" />
            </div>
            <div class="layui-input-inline">
                <label class="layui-form-label">备注:</label>
                <input type="text" value="" name="remark" placeholder="备注" class="layui-input" />
            </div>
			<div class="layui-input-inline">
				<a class="layui-btn" href="javascript:search();">查询</a><span></span>
				<a class="layui-btn" href="javascript:openAdd()">新增</a>
			</div>
		</div>
	</form>
	<div class="layui-form">
		<table id="layui-table" lay-filter="grid"></table>
	</div>
</div>
<div id="LAY_democodejs">
	<script src="${staticPath}/js/jquery.min.js" charset="utf-8"></script>
	<script src="${ui2}/layui.all.js" charset="utf-8"></script>
	<script src="${staticPath}/js/common.js" charset="utf-8"></script>
	<script src="${staticPath}/js/content2.js" charset="utf-8"></script>
	<script type="text/html" id="gridBar">
		<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
	</script>
	<script>
        var tableIns=null;
        layui.use('table', function(){
            var table = layui.table;
            var height=getGridHeight();
            //第一个实例
            tableIns=table.render({
                elem: '#layui-table'
                ,height: 'full-'+height
                ,url: 'list' //数据接口
                ,page: true //开启分页
                ,cols: [[ //表头
                {field: 'id', title: '主键' ,width:80},
                {field: 'modelId', title: '实体主键' ,width:80},
                {field: 'name', title: '属性名' ,width:80},
                {field: 'columnName', title: '字段名' ,width:80},
                {field: 'columnLenth', title: '字段长度' ,width:80},
                {field: 'soft', title: '排序号' ,width:80},
                {field: 'label', title: '显示名' ,width:80},
                {field: 'dataType', title: '数据类型' ,width:80},
                {field: 'isShowGrid', title: '是否显示在列表' ,width:80},
                {field: 'isSearchItem', title: '是否查询条件' ,width:80},
                {field: 'isRequired', title: '是否必填' ,width:80},
                {field: 'remark', title: '备注' ,width:80}
                 {fixed: 'right', width:100, align:'center', toolbar: '#gridBar'} //这里的toolbar值是模板元素的选择器
                ]]
            	,request: tableRequest
				,response: tableResponse
            });
        });
	</script>
</div>
</body>
</html>
